<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>表单设计器</title>
    <link rel="stylesheet" th:href="@{/pear/component/luminar/css/luminar.css}">
    <link rel="stylesheet" th:href="@{/pear/component/luminar/css/module/HandwrittenSignature.css}">
</head>

<body class="layui-layout-body">
<div id="formdesigner">

</div>
<script th:src="@{/pear/component/layui/layui.js}"></script>
<script th:src="@{/pear/component/luminar/luminar.js}"></script>
<script th:inline="javascript">
    let baseURL = /*[[@{/}]]*/ '';
    let render;
    layui.use(['layer', 'HandwrittenSignature'], function () {
        let handwrittenSignature = layui.HandwrittenSignature;
        let $ = layui.jquery;
        render = handwrittenSignature.render({
            elem: '#formdesigner'
            , defaultColor: "rgba(0, 0, 0, 1)"
            , label: "用户亲笔签名"
            , signLineWidth: 3
            , isGenerateImg: true
        });
    });

    function getCanvasData() { //获取选中数据
        return render.getCanvasData();
    }

</script>

</body>

</html>